﻿using ArtheaEngine;

namespace ArtheaServer.Commands
{
    public abstract class AutoCommand : Command
    {
        protected AutoCommand(string name, string descr) : base(name, descr)
        {
        }

        protected static void Toggle(Character ch, long bit, string on, string off)
        {
            if (ch.Flags.And(bit))
            {
                ch.Flags &= ~bit;
                ch.WriteLine(off);
            }
            else
            {
                ch.Flags |= bit;
                ch.WriteLine(on);
            }
        }
    }
}